import HttpKit from '@/utils/http-kit'

export default {
  /**
   * @description 获取全部维修订单
   * @returns {*}
   */
  getDealReportList () {
    return HttpKit.get('/maintenances', {pageNumber: '0', pageSize: '10000'}).then(
      res => res.data
    )
  },
  /**
   * @description 给工人配发维修订单任务
   * @param maintenanceVo 维修订单
   * @returns {*}
   */
  distributeTask (maintenanceVo) {
    return HttpKit.post('/maintenance/assignTask', {
      customerId: maintenanceVo.customerId,
      id: maintenanceVo.id,
      sellId: maintenanceVo.sellId,
      spotId: maintenanceVo.spotId,
      status: maintenanceVo.status,
      workerOrderId: maintenanceVo.workerOrderId
    }).then(
      res => res.data
    )
  }
}
